<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="stylesheet" type="text/css" href="../../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../../css/common.css" />
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  <title>学术</title>
  <style>
		html, body {width: 100%;min-height: 100%;background: #fff;}
    .h20 {height: 0.5rem;background: #f0f0f0;}
    #header_top {
        background: #2997e4;
        padding-top: 25px;
    }
    .detail_con {
      padding: 1rem;
      padding-bottom: 2rem;
    }
    .detail_con .h20 {
      margin: 0 -1rem;
    }
    .detail_title h3 {
      font-size: 0.9rem;
      color: #333;
    }
    .detail_tit_sm h4 {
      font-size: 0.75rem;
      color: #333;
      font-weight: bold;
      line-height: 1.2rem;
    }
    .detail_addtime h6 {
      font-size: 0.6rem;
      color: #999;
      margin: 1rem 0;
    }
    .detail_text p {
      font-size: 0.75rem;
      line-height: 1.2rem;
      color: #333;
      margin: 1rem 0;
    }
    .detail_text p img {
      width: 100%;
    }
    .detail_like {
      text-align: center;
      border-top: 1px solid #f0f0f0;
      display: block;
      width: 100%;
      margin: 0 -1rem;
      padding: 0.5rem 1rem;
    }
    .detail_like img {
      width: 1rem;
      display: inline-block;
    }
    .aui-list-item-title {}
    .detail_pl {
      margin: 0 -1rem;
      padding: 0.5rem 1rem;
      border-top: 20px solid #f0f0f0;
    }
    .detail_pl .aui-media-list-item-inner {
      -webkit-box-align: start;
      box-align: start;
      -webkit-align-items: flex-start;
      align-items: flex-start;
    }
    .detail_pl .aui-list-item-right {}
    .detail_pl .aui-list-item-text {
      font-size: 0.75rem;
      line-height: 1rem;
      color: #333;
    }
    .detail_pl .aui-list-item-text span {
      color: #999;
      font-size: 0.6rem;
    }
    .detail_pl .aui-list-item-right > div {
      color: #999;
      display: inline-block;
    }
    .detail_pl .aui-list-item-right > div img {
      width: 0.6rem;
      display: inline-block;
    }
    .detail_pl .aui-list-item-right > div:first-child {
      margin-right: 0.6rem;
    }
    .detail_pl .aui-list-item-right > div:nth-child(2) {}
    .detail_pl .text_inner {
      background: #f0eff5;
      padding: 0.3rem;
      margin-top: 0.5rem;
    }
    .detail_pl .text_inner ul {}
    .detail_pl .text_inner ul li {
      color: #666;
      line-height: 1.2rem;
      font-size: 0.75rem;
    }
    .detail_pl .text_inner ul li span {
      color: #333;
      font-weight: bold;
      font-size: 0.75rem;
    }
    .detail_pl .text_inner ul li img {
      width: 0.3rem;
      display: inline-block;
    }
    .detail_talk {
      position: fixed;
      bottom: 0;
      width: 100%;
      background: #fff;
      padding: 0.25rem;
      border-top: 1px solid #f0f0f0;
    }
    .detail_talk {
      padding-right: 3.6rem;
    }
    .detail_talk .detail_talk_inp {
      width: 100%;
      display: inline-block;
      border: 1px solid #999;
      -webkit-border-radius: 0.8rem;
      -moz-border-radius: 0.8rem;
      border-radius: 0.8rem;
      padding: 0 1rem;
    }
    .detail_talk .detail_talk_inp input{
      font-size: 0.7rem;
      height: 1.6rem;
    }
    .detail_talk_ri {
      position: absolute;
      right: 0.2rem;
      bottom: 0;
    }
    .detail_talk_ri img {
      width: 1.2rem;
      margin: 0.2rem 0 0.2rem 0.4rem;
      display: inline-block;
    }
    .aui-toast {
      min-height: 1rem;
    }
    .aui-toast-content {
      margin: 10px 0;
      color: #fff;
    }
    .detail_con_bot {
      padding: 0.5rem 0;
    }
    .detail_con_bot h4 {
      color: #333;
      font-size: 0.75rem;
    }
    .detail_con_bot li {
      color: #2997e4;
      font-size: 0.75rem;
      margin: 0.5rem;
    }
    .detail_con_bot li:before,
    .detail_con_bot li:after {
      content: '';
      display: block;
      height: 0;
      clear: both;
    }
    .detail_con_bot li span {
      display: block;
      padding: 0.2rem 0.4rem;
      -webkit-border-radius: 3px;
      -moz-border-radius: 3px;
      border-radius: 3px;
      float: right;
      color: #2997e4;
      border: 1px solid #2997e4;
    }
    .ml_btns::before,
    .ml_btns::after {
      content: '';
      display: block;
      height: 0;
      clear: both;
    }
    .ml_btns {
      position: fixed;
      bottom: 0;
      width: 100%;
    }
    .ml_btn {
      background: #fff;
      float: left;
      width: 50%;
      padding: 0.5rem 0;
      text-align: center;
      color: #666;
    }
    .ml_btn img {
      width: 1rem;
      display: inline-block;
      vertical-align: middle;
      margin-right: 0.25rem;
    }
    .ml_btn:nth-child(2) {
      background: #2997e4;
      color: #fff;
    }
	</style>
</head>
<body>
  <div id="app">
  <header id="header_top" class="aui-bar aui-bar-nav" >

    <a class="aui-pull-left"  onclick="goback()">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title" id="title">
    详情
  </div>
      <a class="aui-pull-right" @click="openMore(info.newsId)">
          <span class="aui-iconfont aui-icon-more"></span>
      </a>
  </header>
<div class="detail_con">
  <div class="detail_con_top">
    <div class="detail_title">
      <h3>{{info.title}}</h3>
    </div>
    <div class="detail_addtime">
      <h6>{{info.createTime}}</h6>
    </div>
    <div class="detail_text">
      <div v-html="info.keywords"></div>
      <img src="info.pics" v-if="info.pics && info.pics !=''" alt="">
      <div v-html="info.content"></div>
    </div>
  </div>
  <div class="h20"></div>
</div>
<div class="ml_btns">
  <div class="ml_btn" @click="to_chat(info.userid,info.newsAuthor)">
    咨询
  </div>
  <div class="ml_btn" @click="openDetail('sqsb', '申请上报', info.newsId)">
    申请上报
  </div>
</div>

</div>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script>



//打开聊天窗口
function to_chat(id, name) {
  api.openWin({
    name: 'user_info_' + id,
    url: '../forth_frame/user_info_details_win.html',
    pageParam: {
      id: id,
      name: name,
      chat_type:'PRIVATE'
    }
  });
}




apiready = function() {

  var app = new Vue({
    el: '#app',
    data: {
      id: 0,
      info: {},
    },
    created: function() {
      var $_this = this;
      $_this.id = api.pageParam.id
      // console.log(api.pageParam.id)
      api.ajax({
        url: window.Url.getArticleDetail + $_this.id,
        timeout: 300,
      }, function(ret, err) {
          if (ret) {
              // api.alert({ msg: JSON.stringify(ret) });
              $_this.info = ret.data[0]


          } else {
              api.alert({ msg: JSON.stringify(err) });
          }
      })
    },
    methods: {
      openDetail:function (type, title, id) {
        api.openWin({
          name: 'index_detail_' + type,
          pageParam: {
            name: 'index_detail_' + type,
            title: title,
            id: id
          },
          url: './first_header.html',
          delay: 200,
          bounces: false
        });
      },

      openMore: function (id) {
        api.openFrame ({
                name: 'more',
                url: './more.html',
                rect:{
                    x:0,
                    y:44,
                    w:'auto',
                    h:'auto'
                },
                pageParam: {
                  id: id
                },
                bounces: false,
                delay:200
            })
      }
    }
  })
}
  function goback () {
    api.closeWin({name:api.pageParam.name});
  }

</script>
</body>
</html>
